import { query } from '@angular/animations';
import { Component } from '@angular/core';
import { Router } from '@angular/router';
import { TopMenu } from 'src/app/shared/components';
import { HomeService } from '../../service';

@Component({
  selector: 'app-home-container',
  templateUrl: './home-container.component.html',
  styleUrls: ['./home-container.component.scss']
})
// tslint:disable
export class HomeContainerComponent {
  constructor(private router: Router,private service: HomeService) { }

  /**
   * 导航栏数据
   */
  topMenus: TopMenu[] = [];
  ngOnInit(): void {
   this.topMenus = this.service.getTopMenus();
    
  }
  handleTapSelected(topMenu: TopMenu) {
    console.log(topMenu)
    this.router.navigate(['home', topMenu.link], {queryParams:{id:2222}});

  }

}
